package com.jzo2o.customer;

import com.jzo2o.api.customer.dto.response.AddressBookResDTO;
import com.jzo2o.customer.service.impl.AddressBookServiceImpl;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * TODO
 *
 * @Author mr.wei
 * @Date 2025/1/17 下午3:49
 */
@SpringBootTest
public class Tes1t {
    @Autowired
    private AddressBookServiceImpl addressBookService;

    @Test
    public void test(){
        BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder ();
        boolean matches = passwordEncoder.matches("11111111", "$2a$10$LV42/EpqqObsSp0RFirIlOI31xzCttA.aspd3fcYfDCN5QaKBqk2a");
        System.out.println(matches);
    }
    @Test
    public void test2(){

        AddressBookResDTO defaultAddress = addressBookService.getDefaultAddress (1880100164530601984L);
        System.out.println(defaultAddress.toString ());
    }
}
